{extend name="public/base" /}
{block name='content'}
{include file='public/content_header' /}
<!--数据列表页面-->
<section class="content">

    <!--顶部搜索筛选-->
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                <div class="box-body">
                    <form class="form-inline searchForm" id="searchForm" action="{:url('ksindex')}" method="GET">

                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$member_id ? $member_id : '' ;}"
                                   name="member_id" id="member_id" class="form-control input-sm"
                                   placeholder="用户融云ID搜索">
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$s_member_id ? $s_member_id : '' ;}"
                                   name="s_member_id" id="s_member_id" class="form-control input-sm"
                                   placeholder="用户上级融云ID搜索">
                        </div>


                        <div class="form-group" style="padding-top: 3px;width: 260px;">
                            <input style="width: 100%" value="{$me_add_time|default=''}" readonly name="me_add_time" id="me_add_time"
                                   class="form-control input-sm indexSearchDateRange" placeholder="注册时间 区间搜索">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#me_add_time',
                                type: 'datetime',
                                range: true,
                            });
                        </script>
                        <div class="form-group" style="padding-top: 3px;width: 260px;">
                            <input style="width: 100%" value="{$cz_add_time|default=''}" readonly name="cz_add_time" id="cz_add_time"
                                   class="form-control input-sm indexSearchDateRange" placeholder="充值时间 区间搜索">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#cz_add_time',
                                type: 'datetime',
                                range: true,
                            });
                        </script>

                        <br />

                        <div class="form-group" style="padding-top: 3px;">
                            <select name="me_zhuxiao" id="me_zhuxiao" class="form-control input-sm index-search">
                                <option value="">-是否注销-</option>
                                <option value="0"{if isset($me_zhuxiao) && $me_zhuxiao=='1'}selected{/if}>未注销</option>
                                <option value="1"{if isset($me_zhuxiao) && $me_zhuxiao=='2'}selected{/if}>已注销</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="me_sex" id="me_sex" class="form-control input-sm index-search">
                                <option value="">-用户性别-</option>
                                <option value="0"{if isset($me_sex) && $me_sex=='0'}selected{/if}>未设置</option>
                                <option value="1"{if isset($me_sex) && $me_sex=='1'}selected{/if}>男</option>
                                <option value="2"{if isset($me_sex) && $me_sex=='2'}selected{/if}>女</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="me_zx" id="me_zx" class="form-control input-sm index-search">
                                <option value="">-在线状态-</option>
                                <option value="0"{if isset($me_zx) && $me_zx=='0'}selected{/if}>在线</option>
                                <option value="1"{if isset($me_zx) && $me_zx=='1'}selected{/if}>离线</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="me_is_vip" id="me_is_vip" class="form-control input-sm index-search">
                                <option value="">-是否开通会员-</option>
                                <option value="0"{if isset($me_is_vip) && $me_is_vip=='0'}selected{/if}>未开通</option>
                                <option value="1"{if isset($me_is_vip) && $me_is_vip=='1'}selected{/if}>已开通</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;">
                            <select name="px" id="px" class="form-control input-sm index-search">
                                <option value="">-排序（默认注册时间）-</option>
                                <option value="1"{if isset($px) && $px=='1'}selected{/if}>按照充值金额</option>
                                <option value="2"{if isset($px) && $px=='2'}selected{/if}>按照软件停留时长</option>
                                <option value="3"{if isset($px) && $px=='3'}selected{/if}>按照有效观看数</option>
                            </select>
                        </div>
                        <div class="form-group" style="padding-top: 3px;width: 15%">
                            <input style="width: 80%" value="{$all_num ? $all_num : '' ;}"
                                   name="all_num" id="all_num" class="form-control input-sm"
                                   placeholder="有效观看数 搜索（输入大于值）">
                        </div>

                        <br/>
                        <div class="form-group" style="padding-top: 3px;">
                            <input value="{$lcl|default=''}" readonly name="lcl" id="lcl"
                                   class="form-control input-sm indexSearchDateRange" placeholder="选择日期查看留存率">
                        </div>
                        <script>
                            laydate.render({
                                elem: '#lcl',
                            });
                        </script>


                        <div class="form-group" style="padding-top: 3px;">
                            <button class="btn btn-sm btn-primary" type="submit"><i class="fa fa-search"></i> 查询
                            </button>
                        </div>

                        <div class="form-group" style="padding-top: 3px;">
                            <button onclick="clearSearchForm()" class="btn btn-sm btn-default" type="button"><i
                                    class="fa  fa-eraser"></i> 清空查询
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-12">
            <div class="box">

                <!--数据列表顶部-->
                <div class="box-header">
                    <div>
                        <a class="btn btn-success btn-sm ReloadButton" data-toggle="tooltip" title="刷新">
                            <i class="fa fa-refresh"></i> 刷新
                        </a>
                        <b>{$word}</b>
                        <br/><br/>  <b><span style="color: red">{$tjword}</span></b>
                        <br/><br/>  <b><span style="color: red">{$lcl_word}</span></b>
                    </div>
                </div>

                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered datatable" width="100%" style="white-space: nowrap">
                        <thead>
                        <tr >
                            <th style="text-align: center;vertical-align: middle;">注册时间</th>
                            <th style="text-align: center;vertical-align: middle;">是否注销</th>
                            <th style="text-align: center;vertical-align: middle;">软件停留时长</th>
                            <th style="text-align: center;vertical-align: middle;">刷视频时长</th>
                            <th style="text-align: center;vertical-align: middle;">有效观看数</th>
                            <th style="text-align: center;vertical-align: middle;">充值金额</th>
                            <th style="text-align: center;vertical-align: middle;">充值次数</th>
                            <th style="text-align: center;vertical-align: middle;">融云ID</th>
                            <th style="text-align: center;vertical-align: middle;">用户UID</th>
                            <th style="text-align: center;vertical-align: middle;">性别</th>
                            <th style="text-align: center;vertical-align: middle;">昵称</th>
                            <th style="text-align: center;vertical-align: middle;">头像</th>
                            <th style="text-align: center;vertical-align: middle;">上级融云ID(UID)(昵称)</th>
                            <th style="text-align: center;vertical-align: middle;">绑定方式</th>
                            <th style="text-align: center;vertical-align: middle;">会员</th>
                            <th style="text-align: center;vertical-align: middle;">在线状态</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name='data' id='item' key='data_key'}


                        {if $item.tr_color==0}
                        <tr>
                        {/if}
                        {if $item.tr_color==1}
                        <tr style="background-color: aquamarine">
                        {/if}


                            <td style="text-align: center;vertical-align: middle;">{$item.me_add_time}</td>

                            <td style="text-align: center;vertical-align: middle;">
                                {if $item.me_zhuxiao == 1}
                                <span style="color: red;">{$item.me_zhuxiao_word}</span>
                                {/if}
                                {if $item.me_zhuxiao == 0}
                                <span style="color: green;">{$item.me_zhuxiao_word}</span>
                                {/if}
                            </td>

                            <td style="text-align: center;vertical-align: middle;">{$item.wrj_time}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.ssp_time}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.all_num}个</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.cz_money}元</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.cz_num}次</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.member_id}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_uid}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_sex_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_nick_name}</td>
                            <td style="text-align: center;vertical-align: middle;" class="photo-list"><img class="dataListImg" src="{$item.me_img}"></td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_parent_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_bind_type_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_is_vip_word}</td>
                            <td style="text-align: center;vertical-align: middle;">{$item.me_zx_word}</td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>

                <!-- 数据列表底部 -->
                <div class="box-footer">
                    {$page|raw}
                    <label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">
                        <small>共{$total}条记录</small>&nbsp;
                        <small>每页显示</small>
                        &nbsp;
                        <select class="input-sm" onchange="changePerPage(this)">
                            <option value="10" {if $admin.per_page==10}selected{/if}>10</option>
                            <option value="20" {if $admin.per_page==20}selected{/if}>20</option>
                            <option value="30" {if $admin.per_page==30}selected{/if}>30</option>
                            <option value="50" {if $admin.per_page==50}selected{/if}>50</option>
                            <option value="100" {if $admin.per_page==100}selected{/if}>100</option>
                        </select>
                        &nbsp;
                        <small>条记录</small>
                    </label>
                </div>

            </div>
        </div>
    </div>
</section>
<script>
    $(function () {
        $('.photo-list img').on('click', function () {
            layer.photos({
                photos: '.photo-list',
                shadeClose: false,
                closeBtn: 2,
                anim: 5
            });
        })
    });
</script>
{/block}

